/**
 * 2018年12月6日下午12:15:07
 * @author 谢进财
 */
package com.baihang.platform.model.dbMap;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.baihang.framework.model.BaseModel;
import com.baihang.platform.model.UserModel;

public class UserRowMapper<T extends BaseModel> implements RowMapper<BaseModel> {

	@Override
	public UserModel mapRow(ResultSet rs, int rowNum) throws SQLException {
		if (!rs.wasNull()|| rs.getFetchSize()!=0) {
			UserModel model = new UserModel();
			model.setUserName(rs.getString("userName"));
			model.setPassword(rs.getString("password"));
			model.setUserCode(rs.getString("userCode"));
			model.setChineseName(rs.getString("chineseName"));
			model.setGroupCode(rs.getString("groupCode"));
			model.setGroupId(rs.getString("groupId"));
			model.setdSource(rs.getString("D_Source"));
			return model;
		} else {
			return null;
		}
	}

}
